package com.ajavaer.framework.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "ajavaer.weixin.jssdk")
public class WeixinJsSDKConfig {

    private String ticketCacheKey = "WEIXIN_JSSDK_JSAPITICKET_CACHE";

    private String jsapi_ticket_url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=%s&type=jsapi";

    public String getJsapi_ticket_url(String access_token) {
        return String.format(jsapi_ticket_url, access_token);
    }


    public String getTicketCacheKey() {
        return ticketCacheKey;
    }

    public void setTicketCacheKey(String ticketCacheKey) {
        this.ticketCacheKey = ticketCacheKey;
    }

    public String getJsapi_ticket_url() {
        return jsapi_ticket_url;
    }

    public void setJsapi_ticket_url(String jsapi_ticket_url) {
        this.jsapi_ticket_url = jsapi_ticket_url;
    }
}
